<template>
	<view>
		<view class="text">
			<image class="img" src="/static/img/my/gonggao.png" v-show="show == 0"></image>
			<image class="img" src="/static/img/my/shenhe.png" v-show="show == 1"></image>
			<image class="img" src="/static/img/my/notice1.png" v-show="show == 2"></image>
			<text class="title">{{noticeDetail.title}}</text>
			<view class="word">
				<text>{{noticeDetail.content}}</text>
			</view>
			<view class="time">
				<text>{{date}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				noticeDetail: "",
				name: "",
				show: 0,
				date:"",
			}
		},
		onLoad(option) {
			console.log(option.index+"---"+option.senderType+"-----"+option.cdate);
			const index = option.index;
			this.show = option.senderType;
			this.date = option.cdate;
			this.loadData(index);
		},
		methods: {
			loadData(index) {
				const notice = uni.getStorageSync("notice");
				const info = uni.getStorageSync("Infomation");
				console.log(info);
				this.name = info.name;
				this.noticeDetail = notice[index];
			},
		}
	}
</script>

<style>
	page {
		background-color: rgba(78, 78, 78, 0.05);
	}
	.text{
		margin-top: 30rpx;
		width: 100%;
		height: auto;
	}
	.img{
		width: 70rpx;
		height: 70rpx;
		padding-left: 30rpx;
		float: left;
	}
	.title{
		font-size: 30rpx;
		color: rgba(78, 78, 78, 1);
		font-weight: bold;
		padding-left: 20rpx;
		position: relative;
		top: 15rpx;
	}
	.word{
		margin: 20rpx 20rpx;
		font-size: 30rpx;
		color: rgba(78, 78, 78, 0.8);
		padding: 20rpx;
	}
	.time{
		float: right;
		font-size: 25rpx;
		color: rgba(78, 78, 78, 0.6);
		margin-right: 30rpx ;
	}
</style>
